package me.tonywang.sys.model;

import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class Pojo implements Serializable {


    @NotEmpty (message = "姓名不能为空")
    String name ;

    @Range(min = 1 , message = "年龄不能小于1")
    Integer age ;


    Long longNum;

    BigDecimal bigDecimalNum;


    Date birthday = new java.util.Date();

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Pojo{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", birthday=" + birthday +
                '}';
    }


    public Long getLongNum() {
        return longNum;
    }

    public void setLongNum(Long longNum) {
        this.longNum = longNum;
    }

    public BigDecimal getBigDecimalNum() {
        return bigDecimalNum;
    }

    public void setBigDecimalNum(BigDecimal bigDecimalNum) {
        this.bigDecimalNum = bigDecimalNum;
    }
}
